package day9;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class demo1 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        String s= reader.readLine();
     StringBuffer sb=new StringBuffer(s);
     sb.reverse();
     StringBuffer ret=new StringBuffer();
        for (int i = 0; i <s.length() ; i++) {
            if(i%3==0&&i!=0){
                ret.append(",");
            }
            ret.append(sb.charAt(i));
        }
        System.out.println(ret.reverse().toString());
    }
}
